package lion.framework.core.util;

import java.util.Comparator;

import org.apache.commons.lang.StringUtils;

public class StringLengthCompartor implements Comparator<String> {

	@Override
	public int compare(String str1, String str2) {

		if (StringUtils.isBlank(str1)) {
			str1 = "";
		}
		if (StringUtils.isBlank(str2)) {
			str2 = "";
		}

		return -(str1.length() - str2.length());
	}
}
